# -*- coding: utf-8 -*-
from wtforms import Form, IntegerField, StringField, FloatField, DateField, DateTimeField, validators


class regist(Form):
    phone = StringField('phone', [validators.Length(max=20)])
    password = StringField('password')
    token = StringField('token')
    portrait = StringField('portrait')


class email_regist(Form):
    email = StringField('email', [validators.Email(), validators.DataRequired()])
    password = StringField('password', [validators.DataRequired()])
    token = StringField('token')


class phone(Form):
    phone = StringField('phone', [validators.DataRequired(), validators.Length(max=20)])


class email(Form):
    email = StringField('email', [validators.Email(), validators.DataRequired()])


class bindtoken(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    token = StringField('token', [validators.DataRequired()])


class BindDeviceToken(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    token = StringField('token')
    version = StringField('version')


class login(Form):
    phone = StringField('phone', [validators.Length(max=20)])
    password = StringField('password')
    email = StringField('email')
    token = StringField('token')
    logintype = StringField('logintype', [validators.DataRequired()])
    model = StringField('model')


class modifypassword(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    oldpassword = StringField('oldpassword', [validators.DataRequired()])
    newpassword = StringField('newpassword', [validators.DataRequired()])


class forgetpassword(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    password = StringField('password', [validators.DataRequired()])


class usermodifyportrait(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    portrait = StringField('portrait', [validators.DataRequired()])


class userid(Form):
    userid = IntegerField('userid', [validators.DataRequired()])


class addbaby(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    imei = StringField('imei', [validators.DataRequired()])
    relate = StringField('relate', [validators.DataRequired()])
    babyphone = StringField('babyphone', [validators.Length(max=20)])
    userphone = StringField('userphone')
    portrait = StringField('portrait')
    name = StringField('name')
    age = IntegerField('age')
    height = IntegerField('height')
    weight = IntegerField('weight')
    sex = StringField('sex')
    steplen = IntegerField('steplen')
    birthday = DateField('birthday')


class baby(Form):
    imei = StringField('imei', [validators.DataRequired()])


class userbaby(Form):
    imei = StringField('imei', [validators.DataRequired()])
    userid = IntegerField('userid', [validators.DataRequired()])


class userbabyrelate(Form):
    imei = StringField('imei', [validators.DataRequired()])
    userid = IntegerField('userid', [validators.DataRequired()])
    relate = StringField('relate', [validators.DataRequired()])


class babyname(Form):
    imei = StringField('imei', [validators.DataRequired()])
    name = StringField('name', [validators.DataRequired()])


class babyportrait(Form):
    imei = StringField('imei', [validators.DataRequired()])
    portrait = StringField('portrait', [validators.DataRequired()])


class babyage(Form):
    imei = StringField('imei', [validators.DataRequired()])
    age = IntegerField('age', [validators.DataRequired()])


class babyheight(Form):
    imei = StringField('imei', [validators.DataRequired()])
    height = IntegerField('height', [validators.DataRequired()])


class babystartarget(Form):
    imei = StringField('imei', [validators.DataRequired()])
    target = IntegerField('target', [validators.DataRequired()])
    award = StringField('award')
    level1 = StringField('level1')
    level2 = StringField('level2')
    level3 = StringField('level3')


class babysteptarget(Form):
    imei = StringField('imei', [validators.DataRequired()])
    date = DateField('date', [validators.DataRequired()])
    target = IntegerField('target', [validators.DataRequired()])


class babydata(Form):
    imei = StringField('imei', [validators.DataRequired()])
    date = DateField('date', [validators.DataRequired()])


class babymodifystar(Form):
    imei = StringField('imei', [validators.DataRequired()])
    star = StringField('star', [validators.DataRequired()])


class babymodifystep(Form):
    imei = StringField('imei', [validators.DataRequired()])
    date = DateField('date', [validators.DataRequired()])
    step = IntegerField('step', [validators.DataRequired()])


class babymodifydistance(Form):
    imei = StringField('imei', [validators.DataRequired()])
    date = DateField('date', [validators.DataRequired()])
    distance = FloatField('distance', [validators.DataRequired()])


class babymodifycalories(Form):
    imei = StringField('imei', [validators.DataRequired()])
    date = DateField('date', [validators.DataRequired()])
    calories = FloatField('calories', [validators.DataRequired()])


class babytimelocate(Form):
    imei = StringField('imei', [validators.DataRequired()])
    starttime = DateTimeField('starttime', [validators.DataRequired()])
    language = StringField('language')


class Immediate(Form):
    imei = StringField('imei', [validators.DataRequired()])
    num = IntegerField('num')


class babynowlocate(Form):
    imei = StringField('imei', [validators.DataRequired()])
    language = StringField('language')


class allbabynowlocate(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    language = StringField('language')


class saferegion(Form):
    imei = StringField('imei', [validators.DataRequired()])
    saferegionid = IntegerField('saferegionid', [validators.DataRequired()])


class addsaferegion(Form):
    imei = StringField('imei', [validators.DataRequired()])
    name = StringField('name', [validators.DataRequired()])
    address = StringField('address', [validators.DataRequired()])
    radius = IntegerField('radius', [validators.DataRequired()])
    lon = FloatField('lon', [validators.DataRequired()])
    lat = FloatField('lat', [validators.DataRequired()])


class modifysaferegion(Form):
    imei = StringField('imei', [validators.DataRequired()])
    saferegionid = IntegerField('saferegionid', [validators.DataRequired()])
    name = StringField('name')
    address = StringField('address')
    radius = IntegerField('radius')
    lon = FloatField('lon')
    lat = FloatField('lat')


class uploadlocate(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    imei = StringField('imei', [validators.DataRequired()])
    address = StringField('address', [validators.DataRequired()])
    lon = FloatField('lon', [validators.DataRequired()])
    lat = FloatField('lat', [validators.DataRequired()])


class babypagenum(Form):
    imei = StringField('imei', [validators.DataRequired()])
    page = IntegerField('page')
    num = IntegerField('num')


class getsos(Form):
    imei = StringField('imei', [validators.DataRequired()])
    page = IntegerField('page')
    num = IntegerField('num')
    date = DateField('date')
    month = StringField('month')


class sendmessage(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    imei = StringField('imei', [validators.DataRequired()])
    content = StringField('content', [validators.DataRequired()])
    audioid = IntegerField('audioid', [validators.DataRequired()])
    audiolen = IntegerField('audiolen', [validators.DataRequired()])


class getmessage(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    time = DateTimeField('time')
    page = IntegerField('page')
    num = IntegerField('num')


class setmessagereadtime(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    time = DateTimeField('time', [validators.DataRequired()])


class getaudio(Form):
    userid = StringField('userid', [validators.DataRequired()])
    audioid = IntegerField('audioid', [validators.DataRequired()])


class setsilent(Form):
    imei = StringField('imei', [validators.DataRequired()])
    num = IntegerField('num')
    weekday = StringField('weekday', [validators.DataRequired()])
    starttime = StringField('starttime', [validators.DataRequired()])
    endtime = StringField('endtime', [validators.DataRequired()])
    status = IntegerField('status')


class delsilent(Form):
    imei = StringField('imei', [validators.DataRequired()])
    num = IntegerField('num', [validators.DataRequired()])


class silent(Form):
    imei = StringField('imei', [validators.DataRequired()])
    operate = StringField('operate', [validators.DataRequired()])


class settimezone(Form):
    imei = StringField('imei', [validators.DataRequired()])
    timezone = StringField('timezone', [validators.DataRequired()])


class userphone(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    phone = StringField('phone', [validators.DataRequired(), validators.Length(max=20)])


class feedback(Form):
    userid = IntegerField('userid', [validators.DataRequired()])
    content = StringField('content', [validators.DataRequired()])


class setlocalinterval(Form):
    imei = StringField('imei', [validators.DataRequired()])
    minute = IntegerField('minute', [validators.DataRequired()])
